package com.whatech.mall.user.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 用户实体。
 */
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@TableName("user")
public class User {

    // 用户ID，type = IdType.ID_WORKER 表示使用雪花算法生成主键ID
    @TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;
    // 用户名
    @TableField(value = "username")
    private String username;
    // 密码
    @TableField(value = "password")
    private String password;
    // 昵称
    @TableField(value = "nickname")
    private String nickname;
    // 性别
    @TableField(value = "sex")
    private int sex;
    // 年龄
    @TableField(value = "age")
    private int age;
    // 手机号
    @TableField(value = "mobile")
    private String mobile;
    // 邮件
    @TableField(value = "email")
    private String email;
    // 创建时间
    private long createTime;

}
